import com.nkzy.pojo.User;
import com.nkzy.service.UserService;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

public class UserServiceImplTest {
    //@Autowired //按类型注入，当相同的类出现多次时，对象下面会有线色波浪线
    @Resource //按名称注入
    private UserService userService;
    @Test
    public void testFindUserByName(){
        User user = userService.findUserByName("nkzyddd");
        System.out.println(user);
    }
    @Test
    public void testRegister(){
        userService.register("nkzyddd","0000");
        System.out.println("注册成功");
    }
}
